package action.admin;

import servletunit.struts.MockStrutsTestCase;
import org.junit.After;
import org.junit.Before;

public class TestAdminRechercheClientServiceAction extends MockStrutsTestCase {

	@Before
	public void setUp() throws Exception {
		super.setUp();
	}

	@After
	public void tearDown() throws Exception {
	}
	
	public void testRecherche(){
		setRequestPathInfo("/AdminRechercheClientServiceAction");
		addRequestParameter("action","recherche");
		addRequestParameter("mail","superman@u-paris10.fr");
		addRequestParameter("nomPrenom","");
		addRequestParameter("bloque","true");
		addRequestParameter("min","1");
		addRequestParameter("typeCompte","Client");
		actionPerform();
		verifyForward("success");

		assertEquals("superman@u-paris10.fr", (String)	getRequest().getAttribute("mail"));

	}

}
